package com.ymatou.iapi.idcardquery.resp;

import java.util.HashMap;
import java.util.Map;

/**
 * 贝海审核拒绝原因枚举
 */
public enum RejectReasonEnum {
	/**
	 * 图片模糊或缺失
	 */
	PictureFuzzyOrLost(2, "图片模糊或缺失"),

	/**
	 * 身份证号码错误
	 */
	IdCodeError(3, "身份证号码错误"),

	/**
	 * 身份证图片与号码不匹配
	 */
	PicAndIdCodeNotMatch(4, "身份证图片与号码不匹配");

	private static final Map<Integer, RejectReasonEnum> maps = new HashMap<>();

	static {
		for (RejectReasonEnum e : RejectReasonEnum.values()) {
			maps.put(e.getCode(), e);
		}
	}

	int code;
	String message;

	RejectReasonEnum(int code, String message) {
		this.code = code;
		this.message = message;
	}

	public int getCode() {
		return code;
	}

	public String getMessage() {
		return message;
	}

	public static RejectReasonEnum getEnum(int code) {

		return maps.get(code);
	}

}